This invention relates to systems and methods for graphics processing.
In a 3D graphics processing system, objects of a scene are represented with groups of primitives, which are typically projected, scan converted, textured, and shaded during rendering of the scene. A primitive has a simple geometric shape, often a triangle, defined by the positions of one or more vertices (e.g. three vertices in the case that the primitive is a triangle) to which a texture can be applied. The rendering of a 3D scene processes the primitives to form an image comprising an array of image pixels.
During rendering of a scene, a graphics processing unit (GPU) fetches texture data, which is stored in memory, to apply texture to objects in the scene. This transfer of data between the GPU and the memory utilises significant memory bandwidth and consumes power. Furthermore, large textures require a large amount of memory to be allocated to them, which can lead to a shortage of memory for use by other applications.
An example of a large texture is a shadow map, which is used to add shadows to a scene. The basic principle of shadow mapping is to render a scene from the point of view of a light source for the scene (such as the sun) and to store the depth of every surface that is visible (i.e. every surface that is lit by the light source). Next, the regular scene (from the camera's point of view) is rendered and the depth of every point drawn is compared to the stored depths to determine if the drawn point is in front of or behind the stored depth from the point of view of the light source. If the depth of a point is behind a lit surface, then that point is in shadow. Otherwise, it is lit. The depth information is stored as a texture (i.e. as a shadow map), which requires a large amount of memory, especially for high resolution shadow maps. Generating and storing a high resolution shadow map requires significant processing power, a large amount of memory and a high memory bandwidth. As the transfer of data between memory and the GPU is a significant cause of power consumption, reductions that are made in this area will allow the GPU to operate at lower power. Additionally, any reductions in memory bandwidth use and the hardware optimisations associated with it can boost application performance.
There is, therefore, a need to reduce memory and processing overheads in a graphics processing system.